package org.dong.service.Impl;


import org.dong.mapper.MealMapper;
import org.dong.pojo.Meal;
import org.dong.service.MealService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Component("mealService")
@Transactional
public class MealServiceImpl implements MealService {

    @Resource
    MealMapper mealMapper;

    @Override
    public List<Meal> getMealList(Integer page) {

        return mealMapper.getMealList(page);
    }

    @Override
    public Meal getMeal(int id) {
        return mealMapper.getMeal(id);
    }

    @Override
    public Integer getMealListCount() {
        return mealMapper.getMealListCount();
    }
}
